package ua.mykola.graph;

public class GraphFactory {
	public static Graph createGraph() {
		Graph graph = new AdjListGraph();
		graph.addEdge("A", "B", 6);
		graph.addEdge("A", "D", 4);
		graph.addEdge("A", "I", 9);

		graph.addEdge("B", "C", 3);
		graph.addEdge("B", "D", 3);
		graph.addEdge("B", "E", 1);

		graph.addEdge("C", "E", 2);
		graph.addEdge("C", "F", 2);

		graph.addEdge("D", "E", 4);
		graph.addEdge("D", "G", 6);

		graph.addEdge("E", "F", 8);
		graph.addEdge("E", "G", 6);
		graph.addEdge("E", "H", 7);

		graph.addEdge("F", "H", 11);

		graph.addEdge("G", "H", 3);
		graph.addEdge("G", "I", 2);
		graph.addEdge("G", "J", 2);

		graph.addEdge("H", "J", 4);

		graph.addEdge("I", "J", 1);
		return graph;
	}
}
